/**
 * 
 */
package com.geezdata.cps.admin.task.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author sszheng
 * @date 创建时间：2017年10月12日 上午10:35:08
 *
 */
public class SampleJob implements Job {
	private static final Logger logger = LoggerFactory.getLogger(SampleJob.class);
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		String params = (String) context.getTrigger().getJobDataMap().get("params");
		String triggerName = context.getTrigger().getKey().getName();
		String triggerGroup = context.getTrigger().getKey().getGroup();
		String jobName = context.getJobDetail().getKey().getName();
		String jobGroup = context.getJobDetail().getKey().getGroup();
		try {
			Thread.sleep(6000l);
		} catch (InterruptedException e) {
		}
		logger.error("params: " + params);
		logger.error("triggerName: " + triggerName);
		logger.error("triggerGroup: " + triggerGroup);
		logger.error("jobName: " + jobName);
		logger.error("jobGroup: " + jobGroup);
	}

}
